﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Nop.Core.Domain.News;
using System;
using System.Collections.Generic;
using System.Text;

namespace Nop.Data.Mapping.News
{
    public class NewsCategoryMappingMap : NopEntityTypeConfiguration<NewsCategoryMapping>
    {
        public override void Configure(EntityTypeBuilder<NewsCategoryMapping> builder)
        {
            builder.ToTable("News_Category_Mapping");
            builder.HasKey(map => map.Id);
            builder.Property(map => map.NewsId).IsRequired();
            builder.Property(map => map.CategoryId).IsRequired();
            base.Configure(builder);
        }
    }
}
